import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// element-ui plus 的引入
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
// icon 图标引入
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'; // 引入整体样式
import lang from 'element-plus/es/locale/lang/zh-cn'; // 引入中文语言包
import 'dayjs/locale/zh-cn';
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

const app = createApp(App)

function useTable (app) {
  app.use(VXETable)
}
// icon 图标挂载
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(useTable)
app.use(ElementPlus, { locale: lang });

app.use(createPinia())
app.use(router)
// 挂载到app实例上
app.use(ElementPlus)
app.mount('#app')
